#include("/manage/_common/_layout.html")
#@layout()

### ********************************* 定义页面标题
#define title()
链接列表
#end

### ********************************* css导入
#define import_css()
#end

### ********************************* js导入
#define import_js()
#end

### ********************************* Body内容区开始
#define main()
<div class="layui-form layui-card-header" style="height: auto;">
	<div class="layui-form-item">
		<div class="layui-inline">
			<label class="layui-form-label">标题</label>
			<div class="layui-input-inline">
				<input id="title" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">分类</label>
			<div class="layui-input-inline">
				<select name="categoryId">
					<option value="">-- 请选择 --</option>
					#for(linkCategory : linkCategoryList)
					<option value="#(linkCategory.id)">#(linkCategory.name)</option>
					#end
				</select>
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">状态</label>
			<div class="layui-input-inline">
				<select id="status">
					<option value="">-- 请选择 --</option>
					<option value="on">启用</option>
					<option value="off">禁用</option>
				</select>
			</div>
		</div>
		<div class="layui-inline">
			<a class="layui-btn" lay-submit="" id="ID_btn_search">
				<i class="layui-icon layui-icon-search"></i>
			</a>
		</div>
	</div>
</div>

<table class="layui-table"
	lay-data="{height: 'full-100', cellMinWidth: 60,url:'#(ctx)/manage/link/ajaxSearch', page:true, initSort: {field:'categoryId', type:'asc'}, id:'ID_master_table', toolbar: '#ID_master_table_toolbar'}"
	lay-filter="LAY-master-table">
	<thead>
		<tr>
			<th lay-data="{field:'id', width:60, align:'center', sort: true, fixed: true}">ID</th>
			<th lay-data="{width:80, sort: true, fixed: true, align:'center', templet:'#statusTpl'}">状态</th>
			<th lay-data="{field:'title', width:300, sort: true, fixed: true}">标题</th>
			<th lay-data="{field:'categoryName', width:300, sort: true}">分类</th>
			<th lay-data="{width:80, align:'center', templet:'#imgTpl'}">图片</th>
			<th lay-data="{width:80, align:'center', templet:'#imgH5Tpl'}">移动端</th>
			<th lay-data="{field:'sortNum', width:80, align:'center', sort: true}">排序</th>
			<th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#ID_master_table_action'}">操作</th>
		</tr>
	</thead>
</table>

<!-- 行操作栏 -->
<script type="text/html" id="ID_master_table_action" >
	<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i></a>
	<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i></a>
</script>

<!-- 数据表格头部工具栏 -->
<script type="text/html" id="ID_master_table_toolbar">
	<div class="layui-btn-container">
		<a class="layui-btn layui-btn-sm" lay-event="add" id="ID_btn_add"><i class="layui-icon layui-icon-add-circle"></i> 添加</a>
	</div>
</script>

<!-- 数据表格单元格模板区域 -->
<script type="text/html" id="statusTpl">
#[[
	{{# if(d.status === 'off'){ }}
		<span style="color: #F581B1;">禁用</span>
	{{#  } else { }}
		启用
	{{#  } }}
]]#
</script>

<!-- 图片预览 -->
<script type="text/html" id="imgTpl">
#[[
	{{# if(d.img){ }}
		<img onclick="Jfsa.reviewImage(this);" style="max-height: 28px; max-width: 50px" src="{{ d.img }}">
	{{#  } else { }}
	{{#  } }}
]]#
</script>
<!-- 移动端图片预览 -->
<script type="text/html" id="imgH5Tpl">
#[[
	{{# if(d.imgH5){ }}
		<img onclick="Jfsa.reviewImage(this);" style="max-height: 28px; max-width: 50px" src="{{ d.imgH5 }}">
	{{#  } else { }}
	{{#  } }}
]]#
</script>

#end
### ********************************* Body内容区结束


### ********************************* 脚本区开始
#define script()
#include("_index_script.html")
#end
### ********************************* JS脚本区结束
